package com.team.runsfast.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.team.runsfast.config.SystemConfig;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("t_user")
@NoArgsConstructor
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    //电话
    private String phone;
    //密码
    private String password;
    //状态 1成功 2失败
    private Integer flag;
    private Date ctime;

    public User(String phone, String password) {
        this.phone = phone;
        this.password = password;
        flag= SystemConfig.USER_OK;
        ctime=new Date();
    }
}
